package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.entity.ChatMessage;
import org.example.entity.Resources;
import org.springframework.data.jpa.repository.Query;

import org.springframework.data.domain.Pageable;
import java.util.List;


public interface ChatMessageMapper extends BaseMapper<ChatMessage> {
    @Select("SELECT * FROM chathistory WHERE projectName = #{projectName} ORDER BY data DESC;")
    List<ChatMessage> findByProjectNameOrderByDateDesc(@Param("projectName") String projectName);

}
